import { useNavigate } from "react-router";
import styles from "./index.module.scss"
import { Button } from "antd"
import erorrImage from "../../assets/images/error_images/404.png"

export default function ErrorPage () {
  const navigate = useNavigate()

  return (
    <div className={styles.errorSection}>
      <img src={erorrImage} alt="404 image" />
      <div className={styles.errorRight}>
        <p className={styles.errorTitle}>你访问的界面不存在！</p>
        <p className={styles.errorWarning}>管理员说你不能进入此界面</p>
        <p className={styles.errorTips}>请检查你的url是否正确,或点击下面按钮回到首页</p>
        <Button onClick={() => navigate('/home')} type='primary' className={styles.errorButton}>返回到首页</Button>
      </div>
    </div>
  )
}
